package com.prototype.improve.self;

public class Dog implements Cloneable{

    public String name;

    public int age;

    public Dog friend;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public Dog getFriend() {
        return friend;
    }

    public void setFriend(Dog friend) {
        this.friend = friend;
    }

    @Override
    protected Object clone() throws CloneNotSupportedException {
        Dog dog = null;
        try {
            dog = (Dog) super.clone();
        } catch (Exception e){
            e.printStackTrace();
        }
        return dog;
    }
}
